package cn.edu.scau.cmi.maikejian.factory;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;

public class Controller {
    
    @FXML
    private Button chicken;

    @FXML
    private Button beef;

    @FXML
    private TextArea textfied;

    @FXML
    private Button pork;

    @FXML
    void porkCreate(ActionEvent event) {
       PorkFactory PF = new PorkFactory("Pork");
       textfied.appendText(PF.PorkCreate()+"\n");
    }

    @FXML
    void beefCreate(ActionEvent event) {
      BeefFactory BF =new BeefFactory("Beef");
      textfied.appendText(BF.BeefCreat()+"\n");
    }

    @FXML
    void chickenCreate(ActionEvent event) {
       ChickenFactory CF = new ChickenFactory("Chicken");
       textfied.appendText(CF.ChickenCreate()+"\n");
    }

}
